package com.simon.train.business.dto;

import com.simon.train.common.dto.PageReqDto;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
public class DailyTrainQueryDto extends PageReqDto {

    private String code;

    /**
     * POST请求可以用JsonFormat注解 GET请求不可以
     * GET要用DateTimeFormat
     * @DateTimeFormat(pattern = "yyyy-MM-dd")
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date date;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    @Override
    public String toString() {
        return "DailyTrainQueryDto{" +
                "code='" + code + '\'' +
                ", date=" + date +
                '}';
    }


}
